<template>
  <div>
    <el-dialog
      title="新建客户发货"
      :visible.sync="dialogshow"
      :before-close="dialogClose"
      style="display: none"
      top="10vh"
      width="90%"
      :fullscreen="fullscreen"
    >
      <dialog-tools
        v-bind:back="true"
        v-bind:next="true"
        v-bind:goback="true"
        v-bind:prev="true"
        v-bind:screen="true"
        @clickfullscreen="clickfullscreen"
      >
      </dialog-tools>
      <el-form size="mini" :model="customer" label-width="100px">
        <el-tabs class="tabs-table customer-tabs" type="border-card">
          <el-tab-pane label="基本信息">
            <el-row class="item-w230">
              <el-form-item label="客户名称">
                <el-input
                  v-model="formData.kfmc"
                  auto-complete="off"
                  @click.native="handleButtons(2)"
                ></el-input>
              </el-form-item>
              <el-form-item label="业务联系人" prop="customercate">
                <el-input
                  v-model="formData.ywlxr"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
              <!-- <el-form-item label="订单号" prop="creditrank">
                <el-input
                  v-model="formData.order_id"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="款号" prop="creditrank">
                <el-input
                  v-model="customer.certificateno"
                  auto-complete="off"
                ></el-input>
              </el-form-item> -->
            </el-row>

            <el-row class="item-w230"> 
              <el-form-item label="物流公司">
                <el-input
                  v-model="formData.wlgs"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="物流单号">
                <el-input
                  v-model="formData.wldh"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
              <!-- <el-form-item label="物流状态">
                <el-input
                  v-model="customer.address"
                  auto-complete="off"
                ></el-input>
              </el-form-item> -->
              <el-form-item label="发货时间">
                 <el-date-picker
                type="datetime"
                  v-model="formData.datetime"
                  placeholder="来料时间"
                  style="width: 100%"
                  clearable
                ></el-date-picker>
              </el-form-item>
            </el-row>
            <el-row class="item-w230"> </el-row>
            <!-- <el-row class="item-w230">
              <el-form-item label="仓位选择">
                 <el-select
                  v-model="formData.cw"
                  filterable
                  style="width: 100%"
                >
                <el-option label="仓位1" value="1"></el-option>
      <el-option label="仓位2" value="2"></el-option>
                              <el-option label="仓位3" value="3"></el-option>
      <el-option label="仓位4" value="4"></el-option>
</el-select>
              </el-form-item>
              <el-form-item label="入库类别" prop="customercate">
                <el-select
                  v-model="customer.customercate"
                  filterable
                  style="width: 100%"
                >
                        <el-option label="客来石" value="shanghai"></el-option>
      <el-option label="客来金" value="beijing"></el-option>
                              <el-option label="客来配件" value="shanghai"></el-option>
      <el-option label="客来其它" value="beijing"></el-option>
                </el-select>
              </el-form-item>
              </el-row> -->
            <el-row>
              <el-form-item label="备注" style="width: 100%">
                <el-input
                  type="textarea"
                  v-model="formData.memo"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
            </el-row>
<el-row style="margin-bottom: 5px"
            >关联订单款号列表
            <el-button
              style="float: right; margin-left: 15px"
              type="primary"
              @click="handleButtons(3)"
              icon="el-icon-plus"
              size="small"
              >添加</el-button
            ></el-row
          >
          <el-table
            ref="multipleTable"
            :data="tableData"
            border
            stripe
            show-summary
            row-class-name="tableRow"
            header-row-class-name="tableHeader"
            @row-dblclick="handleButtons(44)"
            style="width: 100%; border-top: 1px solid #c5c5c5;height:auto;"
          >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column prop="id" label="序号" width="50"> </el-table-column>
      <el-table-column prop="image" label="图片" width="120">
        <template scope="scope">
          <img :src="scope.row.image" width="40" height="40" class="head_pic" />
        </template>
      </el-table-column>
      <el-table-column prop="order_id" label="订单号" width="150">
      </el-table-column>
      <el-table-column prop="order_id" label="款号" width="150">
      </el-table-column>
      <el-table-column prop="kfmc" label="客户名称" width="150">
      </el-table-column>
      <el-table-column prop="ywlxr" label="业务联系人" width="150">
      </el-table-column>
      <el-table-column prop="name" label="物品名称" width="120">
      </el-table-column>
      <el-table-column prop="klszt" label="客来石状态" width="150">
        <template slot-scope="scope">
          <el-switch
            v-model="scope.row.klszt"
            active-color="#13ce66"
            inactive-color="#ff4949"
            :disabled="true"
          >
          </el-switch>
        </template>
      </el-table-column>

      <el-table-column prop="kljzt" label="客来金状态" width="150">
        <template slot-scope="scope">
          <el-switch
            v-model="scope.row.kljzt"
            active-color="#13ce66"
            inactive-color="#ff4949"
            :disabled="true"
          >
          </el-switch>
        </template>
      </el-table-column>
      <el-table-column prop="klpjzt" label="客来配件状态" width="150">
        <template slot-scope="scope">
          <el-switch
            v-model="scope.row.klpjzt"
            active-color="#13ce66"
            inactive-color="#ff4949"
            :disabled="true"
          >
          </el-switch>
        </template>
      </el-table-column>

      <!-- <el-table-column prop="status" label="审批状态" width="150">
        <template slot-scope="scope">
          <el-popover trigger="hover" placement="top">
            <p>审批人: {{ scope.row.sale_no }}</p>
            <p>审批时间: {{ scope.row.date }}</p>
            <div slot="reference" class="name-wrapper">
              <el-tag size="medium">{{ scope.row.status }}</el-tag>
            </div>
          </el-popover>
        </template>
      </el-table-column> -->
      <el-table-column prop="create_time" label="创建时间" >
      </el-table-column>
 <el-table-column width="80"  fixed="right">
                    <template slot="header" slot-scope="scope">
                      <el-tooltip content="删除选中" placement="bottom">
                        <el-button
                          @click="dialogAdd(scope)"
                          type="danger"
                          icon="el-icon-delete"
                          size="mini"
                        >
                        </el-button>
                      </el-tooltip>
                    </template>
                    <template slot-scope="scope">
                      <el-tooltip content="删除" placement="bottom">
                        <el-button
                          @click="dialogAdd(scope)"
                          type="danger"
                          icon="el-icon-delete"
                          size="mini"
                        >
                        </el-button>
                      </el-tooltip>
                    </template>
                  </el-table-column>
    </el-table>
          </el-tab-pane>
          <el-tab-pane label="主石列表">
                                    <el-row>
              <div
                @click="showTableZs = !showTableZs"
                style="
                  folat: right;
                  width: 100%;
                  font-size: 16px;
                  cursor: pointer;
                "
              >
             <el-row
                  ><el-col :span="3">主石3种</el-col
                  ><el-col :span="3">总数量 10粒</el-col
                  ><el-col :span="3">总重量 200.005克拉 </el-col
                  ><el-col :span="3">&nbsp;</el-col
                  ><el-col :span="3">来石数量 8粒</el-col
                  ><el-col :span="3">来石总重量 180.005克拉</el-col
                  ><el-col :span="1">&nbsp;</el-col
                  ><el-col :span="3"
                    >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i
                      class="el-icon-view el-icon--right"
                    ></i>
                    查看详情</el-col
                  ></el-row
                >
              </div>
            </el-row>
            <el-row
              ><el-col :span:="24">
                <el-table
                  v-if="showTableZs"
                  ref="multipleTable"
                  stripe
                  :data="tableDataZs"
                  :show-summary="false"
                  border
                  row-class-name="tableRow"
                  header-row-class-name="tableHeader"
                  :highlight-current-row="true"
                  @row-dblclick="dialogClose"
                  style="width: 100%; border-top: 1px solid #c5c5c5"
                >
                  <el-table-column
                    type="selection"
                    width="60"
                  ></el-table-column>
                  <el-table-column
                    prop="id"
                    label="序号"
                    width="50"
                  ></el-table-column>
                  <el-table-column
                    prop="name"
                    label="主石"
                    sortable
                  ></el-table-column>
                  <el-table-column prop="kfgh" label="客户提供">
                  </el-table-column>
                  <el-table-column prop="smjz" label="声明价值">
                  </el-table-column>
                  <el-table-column prop="xz" label="形状"> </el-table-column>

                  <el-table-column
                    prop="ys"
                    label="色泽/颜色"
                  ></el-table-column>
                  <el-table-column
                    prop="jd"
                    label="净度"
                    width="50"
                  ></el-table-column>

                  <el-table-column prop="qg" label="切工"></el-table-column>
                  <el-table-column
                    prop="number"
                    label="数量"
                    width="50"
                  ></el-table-column>
                  <el-table-column
                    prop="ct"
                    label="CT（克拉重）"
                  ></el-table-column>

                  <el-table-column
                    prop="zsdj"
                    label="主石单价"
                  ></el-table-column>
                  <el-table-column
                    prop="zszj"
                    label="主石总价"
                  ></el-table-column>
                  <el-table-column prop="kls" label="客来石数量">
                  </el-table-column>
                  <el-table-column prop="laisi" label="石卡号">
                  </el-table-column>
                  <el-table-column prop="lkzt" label="入库状态">
                  </el-table-column>
                  <el-table-column
                    prop="price_sum"
                    label="总价"
                  ></el-table-column>
                   <el-table-column width="80" prop="hdzt" label="核对状态">

                    <template slot-scope="scope">
                      <el-switch
  v-model="scope.row.hdzt"
  active-color="#13ce66"
  inactive-color="#ff4949">
</el-switch>
                    </template>
                  </el-table-column>
                </el-table> </el-col
            ></el-row>


            <el-row>
              <div
                @click="showTableFs = !showTableFs"
                style="
                  folat: right;
                  width: 100%;
                  font-size: 16px;
                  cursor: pointer;
                "
              >
                <el-row
                  ><el-col :span="3">款号副石 3种</el-col
                  ><el-col :span="3">总数量 12粒</el-col
                  ><el-col :span="3">总重量 100.005克拉 </el-col
                  ><el-col :span="3">&nbsp;</el-col
                  ><el-col :span="3">&nbsp;</el-col
                  ><el-col :span="3">&nbsp;</el-col
                  ><el-col :span="1">&nbsp;</el-col
                  ><el-col :span="3"
                    >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i
                      class="el-icon-view el-icon--right"
                    ></i>
                    查看详情</el-col
                  ></el-row
                >
              </div>
            </el-row>

            <el-row
              ><el-col :span:="24">
                <el-table
                  v-if="showTableFs"
                  ref="multipleTable"
                  stripe
                  :data="tableDataFs"
                  :show-summary="false"
                  border
                  row-class-name="tableRow"
                  header-row-class-name="tableHeader"
                  :highlight-current-row="true"
                  @row-dblclick="dialogClose"
                  style="width: 100%; border-top: 1px solid #c5c5c5"
                >
                  <el-table-column
                    type="selection"
                    width="60"
                  ></el-table-column>
                  <el-table-column
                    prop="id"
                    label="序号"
                    width="50"
                  ></el-table-column>
                  <el-table-column
                    prop="name"
                    label="副石"
                    sortable
                  ></el-table-column>
                  <el-table-column prop="kfgh" label="客户提供">
                  </el-table-column>
                  <el-table-column prop="xz" label="形状"> </el-table-column>

                  <el-table-column
                    prop="ys"
                    label="色泽/颜色"
                  ></el-table-column>
                  <el-table-column
                    prop="jd"
                    label="净度"
                    width="80"
                  ></el-table-column>

                  <el-table-column prop="qg" label="切工"></el-table-column>
                  <el-table-column
                    prop="number"
                    label="数量"
                    width="50"
                  ></el-table-column>
                  <el-table-column
                    prop="ct"
                    label="CT（克拉重）"
                  ></el-table-column>

                  <el-table-column
                    prop="zsdj"
                    label="副石单价"
                  ></el-table-column>
                  <!-- <el-table-column
                    prop="zszj"
                    label="副石总价"
                  ></el-table-column> -->
                  <el-table-column prop="klssl" label="客来石数量"> </el-table-column>
                  <el-table-column prop="skh" label="石卡号">
                  </el-table-column>
                  <el-table-column prop="lkzt" label="入库状态">
                  </el-table-column>

                  <!-- <el-table-column
                    prop="price_sum"
                    label="总价"
                  ></el-table-column> -->
                  <el-table-column width="80" prop="hdzt" label="核对状态">
                    
                    <template slot-scope="scope">
                      <el-switch
  v-model="scope.row.hdzt"
  active-color="#13ce66"
  inactive-color="#ff4949">
</el-switch>
                    </template>
                  </el-table-column>
                </el-table> </el-col
            ></el-row>
            <el-divider></el-divider>
          </el-tab-pane>
           <el-tab-pane label="副石列表">
          </el-tab-pane>
          <el-tab-pane label="配件列表">
          </el-tab-pane>
          <el-tab-pane label="收货地址">
            <el-row >
            <el-form-item label="收件人" prop="sjr">
                <el-input
                  v-model="formData.sjr"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="手机号码" prop="tel">
                <el-input
                  v-model="formData.tel"
                  auto-complete="off"
                ></el-input>
              </el-form-item>
               <el-form-item label="详细地址" prop="addr">
                <el-input
                  type="textarea"
                  v-model="formData.addr"
                  auto-complete="off"
                  placeholder="公司的地址，不建议设为私人地址"
                ></el-input>
              </el-form-item>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="附件">
          </el-tab-pane>
        </el-tabs>
      </el-form>
      <div slot="footer" class="dialog-footer">
        

        <el-button type="primary">打印</el-button>
        <el-button @click="dialogClose">取 消</el-button>
        <el-button type="primary" @click="dialogAdd">确定</el-button>
      </div>
    </el-dialog>


    <dialog-search-customer
      v-bind:dialogshow="dialogSearchCustomer"
      @dialog_close="dialog_close_search_customer"
    ></dialog-search-customer>
    <dialog-search-product
      v-bind:dialogshow="dialogSearchProduct"
      @dialog_close="dialog_close_search_product"
    ></dialog-search-product>
  </div>
</template>


<style scoped>
.item-w230 .el-form-item {
  width: 230px;
  float: left;
  margin-bottom: 5px;
}
.el-row {
  margin-bottom: 0px;
}
.el-form--label-top .el-form-item__label {
  padding-bottom: 0px;
}
.el-divider--horizontal {
  margin: 5px 0;
}

.td-lable,
.td-info {
  display: inline-table;
  vertical-align: -webkit-baseline-middle;
}

.td-lable {
  text-align: right;
  width: 100px;
}

.td-info {
  margin-left: 20px;
}

ul {
  list-style-type: none;
}

ul span {
  display: inline-table;
  min-width: 200px;
}

.tabs-table td {
  height: 50px;
  border-bottom: 1px solid #dcdfe6;
}
.customer-tabs .el-tab-pane {
  height: 400px;
  overflow: auto;
  padding: 20px;
}
</style>
<script>
module.exports = {
  methods: {
    dialogAdd() {
      this.$confirm("是否继续操作?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
    dialogClose() {
      this.$emit("dialog_close", 1);
    },
    clickfullscreen() {
      this.fullscreen = !this.fullscreen;
    },
    dialog_close_search_customer(val) {
      console.log(val);
      this.dialogSearchCustomer = false;
    },
    dialog_close_search_product(val) {
      console.log(val);
      this.dialogSearchProduct = false;
    },
    //跟进
    dialog_close_genji_customer(val) {
      console.log(val);
      this.dialogCustomerGenji = false;
    },
    handleButtons(val) {
      console.log(2222);
      switch (val) {
        case 1:
          this.dialogSendMessage = "true";
          console.log(this.dialogSendMessage);
          break;
        case 2:
          console.log(333);
          this.dialogSearchCustomer = "true";
          console.log(this.dialogSearchCustomer);
          break;
        case 3:
          console.log(333);
          this.dialogSearchProduct = "true";
          console.log(this.dialogSearchProduct);
          break;

        case 10:
          console.log(333);
          this.dialogCustomerInfo = "false";
          this.dialogCustomerGenji = "true";
          console.log(this.dialogCustomerGenji);
          break;
        case 22: //编辑报价
          console.log("报价");
          this.dialogBaojiaEdit = "true";
          console.log(this.dialogBaojiaEdit);
          break;
        case 44: 
          console.log("待发货订单");
          this.dialogBaojiaEdit = "true";
          console.log(this.dialogBaojiaEdit);
          break;
      }
    },
    addData() {
      this.tableDatas.push({
        edit: true,
      });
    },
    //确认添加
    confirmAdd(row) {
      row.edit = false;
    },
    //修改
    editData(row) {
      row.edit = true;
    },
    //删除
    deleteData(row, index) {
      this.tableDatas.splice(index, 1);
    },
  },
  props: ["dialogshow"],
  data() {
    return {
      handlePreview:'',
      fileList:[],
      showTableZs: true,
      showTableFs: true,
      fullscreen: false,
      currentPage1: 10,
      inputSearch: "",
      selectsearch: "",
      dialogSearchCustomer: false,
      dialogSearchProduct: false,
      activeName: "first",
      dialogSendMessage: false,
      dialogCustomerInfo: false,
      dialogCustomerGenji: false,
      // dialogshow:false,
      fullscreen: false,
      Sendmssages: {
        address: "",
        customercate: "",
        cate: "",
        nickname: "",
        creditrank: "",
        name: "",
      },

      tableDatas: [],
       tableData: [
        {
          id: "1",
          image: "/public/images/eh1.jpg",
          order_id: "12987126",
          kh: "E126",
          kfmc: "某珠宝公司",
          ywlxr: "吴先生",
          name: "戒指",
          klszt: 0,
          kljzt: 1,
          klpjzt: "",
        },
        {
          id: "2",
          image: "/public/images/eh1.jpg",
          order_id: "12987126",
          kh: "E126",
          kfmc: "某珠宝公司",
          ywlxr: "吴先生",
          name: "戒指",
          klszt: true,
          kljzt: false,
          klpjzt: false,
        },
        {
          id: "3",
          image: "/public/images/eh1.jpg",
        },
        {
          id: "4",
        },
        {
          id: "5",
        },
      ],
tableDataZs: [
        {
          id: "1",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "否",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "2",
          name: "钻石",
          smjz: "40000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "圆形",
          qg: "一般",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "3",
          name: "钻石",
          smjz: "50000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "4",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
      ],
      tableDataFs: [
        {
          id: "1",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "否",
          psf: "120",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "2",
          name: "红宝石",
          smjz: "40000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "5.005",
          xz: "圆形",
          qg: "一般",
          kfgh: "是",
          psf: "120",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "3",
          name: "钻石",
          smjz: "50000",
          number: "2",
          ys: "D",
          jd: "FL",
          ct: "1",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          psf: "130",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
        {
          id: "4",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          psf: "150",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
          hdzt:false,
        },
      ],
      customer: {
        name: "",
        customercode: "",
        customerstatus: "",
        customercate: "",
        creditrank: "",
        creditline: "",
        capital: "",
        annualsales: "",
        bank: "",
        certificateno: "",
        address: "",
        area: "",
        brand: "",
        bankaccount: "",
        trademark: "",
        website: "",
        lperson: "",
        lphone: "",
        contacts: "",

        phone: "",
        phonenum: "",
        weixin: "",
        email: "",
        fax: "",
        resource: "",
        requirement: "",
        ordercountmonth: "",
        purchaseamountmonth: "",
        ordercountyear: "",
        purchaseamountyear: "",
        customerstaffname: "",
        customerstaffcode: "",
        operator: "",
        insertime: "",
        remark: "",
      },
formDataDefault:{
        jsfs: "",
        chzt: "",
        jszt: "",
        shzt: "",
        kfsh:"",
},
      thhyy: [
        { id: 1, typename: "公司原因" },
        { id: 2, typename: "客户原因" },
        { id: 3, typename: "供应商原因" },
        { id: 4, typename: "其它原因" },
      ],
      jsfs: [
        { id: 1, typename: "月结" },
        { id: 2, typename: "现结" },
        { id: 3, typename: "预付全款" },
        { id: 4, typename: "分期付款" },
        { id: 5, typename: "货到付款" },
        { id: 6, typename: "其它" },
      ],
      chzt: [
        { id: 1, typename: "待出库" },
        { id: 2, typename: "已出库待发货" },
        { id: 3, typename: "已发货" },
        { id: 4, typename: "待签收" },
        { id: 5, typename: "已确认收货" },
        { id: 5, typename: "申请退换货" },
        { id: 5, typename: "退换货确认" },
      ],
      jszt: [
        { id: 1, typename: "未结算" },
        { id: 1, typename: "部分结算" },
        { id: 2, typename: "已结算" },
      ],
      shzt: [
        { id: 1, typename: "待审核" },
        { id: 2, typename: "已审核" },
        { id: 3, typename: "未通过" },
        { id: 4, typename: "--" },
      ],
         cangku: [
        { id: 1, typename: "仓库1" },
        { id: 2, typename: "仓库2" },
        { id: 3, typename: "仓库3" },
        { id: 4, typename: "仓库4" },
      ],
        lklb: [
        { id: 1, typename: "成品" },
        { id: 2, typename: "宝石" },
        { id: 3, typename: "耗材" },
        { id: 4, typename: "工具" },
      ],

      formData: {
        kfmc:"",
        kfdm:"",
        lxr:"",
        ywlxr:"",
        approval:"",
        approvaltime:"",
        customerapproval:"",
        customerapprovaltime:"",
        time:"",
        order_id:"",
        product_id:"",
        customer_id:"",
        create_time:"",
        update_time:"",
        name:"",
        address:"",
        size:"",
        tel:"",
        email:"",
        id:"",
        ggcc:"",
        number:"",
        wppl:"",
        wpmc:"",
        kh:"",
        shr:"",
        shzt:"",
        shsj:"",
        bgscp:"",
        wxyy:"",
        wxfy:"",
        scwxjl:"",
        wxjl:"",
        memo:"",
        field101: "",
        field112: 1,
        field105: "",
        field102: "",
        field108: 0,
        field110: "",
        field113: undefined,
        field114: 0,
        field115: 1,
        field118: 0,
        field123: 0,
        field122: 0,
        field206: undefined,
        field212: undefined,
        field170: 2,
        field171: 1,
        field172: "",
        field173: "",
        field174: 0,
        field175: "",
        field177: undefined,
        field178: 0,
        field179: 1,
        field180: 0,
        field181: 0,
        field182: 0,
        field214: undefined,
        field216: undefined,
        field127: [1, "99.984%"],
        field128: "",
        field138: 1,
        field140: 1,
        field135: 6,
        field137: 0,
        field143: undefined,
        field142: 0,
        field144: 1,
        field145: 0,
        field218: undefined,
        field220: undefined,
        field198: "",
        field205: [],
        field188: "",
        field190: "",
        field191: "",
        field189: 1,
        field192: 0,
        field201: 0,
        field195: undefined,
        field194: 0,
        field204: 2,
        field196: 1,
        field202: 0,
        field203: 0,
        field197: 0,
        field224: undefined,
        field226: undefined,
        field2000: undefined,
        field3000: false,
        datetime: "",
        fieldswitch: false,
      },
      rules: {
        field101: [],
        field3000: [],
        datetime: [],
      },
      field3000Options: [
        {
          label: "是",
          value: 1,
        },
      ],
      field101Options: [
        {
          label: "钻石",
          value: 1,
        },
        {
          label: "红宝石",
          value: 2,
        },
        {
          label: "蓝宝石",
          value: 3,
        },
        {
          label: "祖母绿",
          value: 4,
        },
        {
          label: "珍珠",
          value: 5,
        },
        {
          label: "白贝",
          value: 6,
        },
        {
          label: "尖晶石",
          value: 7,
        },
        {
          label: "彩钻石",
          value: 8,
        },
        {
          label: "其他",
          value: 9,
        },
      ],
      field105Options: [
        {
          label: "D",
          value: "D",
        },
        {
          label: "E",
          value: "E",
        },
        {
          label: "F",
          value: "F",
        },
        {
          label: "G",
          value: "G",
        },
        {
          label: "H",
          value: "H",
        },
        {
          label: "I",
          value: "I",
        },
        {
          label: "J",
          value: "J",
        },
        {
          label: "K",
          value: "K",
        },
        {
          label: "L",
          value: "L",
        },
        {
          label: "M",
          value: "M",
        },
        {
          label: "N",
          value: "N",
        },
      ],
      field102Options: [
        {
          label: "FL",
          value: 1,
        },
        {
          label: "IF",
          value: 2,
        },
        {
          label: "VVS1",
          value: 3,
        },
        {
          label: "VVS2",
          value: 4,
        },
        {
          label: "VS1",
          value: 5,
        },
        {
          label: "VS2",
          value: 6,
        },
        {
          label: "SI1",
          value: 7,
        },
        {
          label: "SI2",
          value: 8,
        },
        {
          label: "P1",
          value: 9,
        },
        {
          label: "P2",
          value: 10,
        },
        {
          label: "P3",
          value: 11,
        },
      ],
      field2000Options: [
        {
          label: "圆形",
          value: 1,
        },
        {
          label: "心形",
          value: 2,
        },
        {
          label: "梨形",
          value: 3,
        },
        {
          label: "椭圆形",
          value: 4,
        },
        {
          label: "公主方",
          value: 5,
        },
        {
          label: "玫瑰",
          value: 6,
        },
        {
          label: "马眼",
          value: 7,
        },
        {
          label: "绿术石形",
          value: 8,
        },
        {
          label: "其它",
          value: 9,
        },
      ],
      field110Options: [
        {
          label: "完美",
          value: 1,
        },
        {
          label: "非常好",
          value: 2,
        },
        {
          label: "一般",
          value: 3,
        },
        {
          label: "差",
          value: 4,
        },
      ],

      field115Options: [
        {
          label: "是",
          value: 1,
        },
        {
          label: "否",
          value: 2,
        },
      ],
      field170Options: [
        {
          label: "钻石",
          value: 1,
        },
        {
          label: "红宝石",
          value: 2,
        },
        {
          label: "蓝宝石",
          value: 3,
        },
        {
          label: "祖母绿",
          value: 4,
        },
        {
          label: "珍珠",
          value: 5,
        },
        {
          label: "白贝",
          value: 6,
        },
        {
          label: "尖晶石",
          value: 7,
        },
        {
          label: "彩钻石",
          value: 8,
        },
        {
          label: "其他",
          value: 9,
        },
      ],
      field172Options: [
        {
          label: "D",
          value: "D",
        },
        {
          label: "E",
          value: "E",
        },
        {
          label: "F",
          value: "F",
        },
        {
          label: "G",
          value: "G",
        },
        {
          label: "H",
          value: "H",
        },
        {
          label: "I",
          value: "I",
        },
        {
          label: "J",
          value: "J",
        },
        {
          label: "K",
          value: "K",
        },
        {
          label: "L",
          value: "L",
        },
        {
          label: "M",
          value: "M",
        },
        {
          label: "N",
          value: "N",
        },
      ],
      field173Options: [
        {
          label: "FL",
          value: 1,
        },
        {
          label: "IF",
          value: 2,
        },
        {
          label: "VVS1",
          value: 3,
        },
        {
          label: "VVS2",
          value: 4,
        },
        {
          label: "VS1",
          value: 5,
        },
        {
          label: "VS2",
          value: 6,
        },
        {
          label: "SI1",
          value: 7,
        },
        {
          label: "SI2",
          value: 8,
        },
        {
          label: "P1",
          value: 9,
        },
        {
          label: "P2",
          value: 10,
        },
        {
          label: "P3",
          value: 11,
        },
      ],
      field175Options: [
        {
          label: "圆形",
          value: 1,
        },
        {
          label: "心形",
          value: 2,
        },
        {
          label: "梨形",
          value: 3,
        },
        {
          label: "椭圆形",
          value: 4,
        },
        {
          label: "公主方",
          value: 5,
        },
        {
          label: "玫瑰",
          value: 6,
        },
        {
          label: "马眼",
          value: 7,
        },
        {
          label: "绿术石形",
          value: 8,
        },
        {
          label: "其它",
          value: 9,
        },
      ],
      field179Options: [
        {
          label: "是",
          value: 1,
        },
        {
          label: "否",
          value: 2,
        },
      ],
      field3000Options: [
        {
          label: "是",
          value: 1,
        },
      ],
      field127Options: [
        {
          label: "黄金",
          value: 1,
          id: 101,
          children: [
            {
              label: "千足金99.9%",
              value: "千足金99.9%",
              id: 108,
            },
            {
              label: "万足金99.99%",
              value: "万足金99.99%",
              id: 107,
            },
            {
              label: "24K 99.984%(999‰)",
              value: "99.984%",
              id: 106,
            },
            {
              label: "22k 91.652%(916‰)",
              value: "22k 91.652%(916‰)",
              id: 109,
            },
          ],
        },
        {
          label: "铂金",
          value: "铂金",
          id: 110,
          children: [
            {
              label: "PT999（99.9%）",
              value: "PT999",
              id: 111,
            },
            {
              label: "PT990（99%）",
              value: "PT990",
              id: 112,
            },
          ],
        },
      ],
      field140Options: [
        {
          label: "件",
          value: 1,
        },
        {
          label: "套",
          value: 2,
        },
        {
          label: "款",
          value: 3,
        },
      ],
      field135Options: [
        {
          label: "红",
          value: 1,
        },
        {
          label: "黄",
          value: 2,
        },
        {
          label: "蓝",
          value: 3,
        },
        {
          label: "黑",
          value: 4,
        },
        {
          label: "白",
          value: 5,
        },
        {
          label: "橙",
          value: 6,
        },
        {
          label: "绿",
          value: 7,
        },
        {
          label: "青",
          value: 8,
        },
        {
          label: "玫瑰金",
          value: 9,
        },
        {
          label: "玫瑰金",
          value: 10,
        },
        {
          label: "其它",
          value: 11,
        },
      ],
      field144Options: [
        {
          label: "是",
          value: 1,
        },
        {
          label: "否",
          value: 2,
        },
      ],
      field198Options: [
        {
          label: "钻石",
          value: 1,
        },
        {
          label: "红宝石",
          value: 2,
        },
        {
          label: "蓝宝石",
          value: 3,
        },
        {
          label: "祖母绿",
          value: 4,
        },
        {
          label: "珍珠",
          value: 5,
        },
        {
          label: "白贝",
          value: 6,
        },
        {
          label: "尖晶石",
          value: 7,
        },
        {
          label: "彩钻石",
          value: 8,
        },
        {
          label: "其他",
          value: 9,
        },
      ],
      field205Options: [
        {
          label: "黄金",
          value: 1,
          id: 101,
          children: [
            {
              label: "千足金99.9%",
              value: "千足金99.9%",
              id: 108,
            },
            {
              label: "万足金99.99%",
              value: "万足金99.99%",
              id: 107,
            },
            {
              label: "24K 99.984%(999‰)",
              value: "99.984%",
              id: 106,
            },
            {
              label: "22k 91.652%(916‰)",
              value: "22k 91.652%(916‰)",
              id: 109,
            },
          ],
        },
        {
          label: "铂金",
          value: "铂金",
          id: 110,
          children: [
            {
              label: "PT999（99.9%）",
              value: "PT999",
              id: 111,
            },
            {
              label: "PT990（99%）",
              value: "PT990",
              id: 112,
            },
          ],
        },
      ],
      field190Options: [
        {
          label: "件",
          value: 1,
        },
        {
          label: "套",
          value: 2,
        },
        {
          label: "款",
          value: 3,
        },
      ],
      field191Options: [
        {
          label: "红",
          value: 1,
        },
        {
          label: "黄",
          value: 2,
        },
        {
          label: "蓝",
          value: 3,
        },
        {
          label: "黑",
          value: 4,
        },
        {
          label: "白",
          value: 5,
        },
        {
          label: "橙",
          value: 6,
        },
        {
          label: "绿",
          value: 7,
        },
        {
          label: "青",
          value: 8,
        },
        {
          label: "玫瑰金",
          value: 9,
        },
        {
          label: "玫瑰金",
          value: 10,
        },
        {
          label: "其它",
          value: 11,
        },
      ],
      field204Options: [
        {
          label: "货重*金价",
          value: 1,
        },
        {
          label: "数量*单价",
          value: 2,
        },
      ],
      field196Options: [
        {
          label: "是",
          value: 1,
        },
        {
          label: "否",
          value: 2,
        },
      ],
      field127Props: {
        multiple: false,
        label: "label",
        value: "value",
        children: "children",
      },
      field205Props: {
        multiple: false,
        label: "label",
        value: "value",
        children: "children",
      },
      tableDataZs: [
        {
          id: "1",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "否",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "2",
          name: "钻石",
          smjz: "40000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "圆形",
          qg: "一般",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "3",
          name: "钻石",
          smjz: "50000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "4",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
      ],
      tableDataFs: [
        {
          id: "1",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "否",
          psf: "120",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "2",
          name: "红宝石",
          smjz: "40000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "5.005",
          xz: "圆形",
          qg: "一般",
          kfgh: "是",
          psf: "120",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "3",
          name: "钻石",
          smjz: "50000",
          number: "2",
          ys: "D",
          jd: "FL",
          ct: "1",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          psf: "130",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
        {
          id: "4",
          name: "钻石",
          smjz: "20000",
          number: "1",
          ys: "D",
          jd: "FL",
          ct: "1231",
          xz: "公主方",
          qg: "完美",
          kfgh: "是",
          psf: "150",
          xsfdj: "100",
          xsfzj: "100",
          zsdj: "10000",
          zszj: "20000",
          price_sum: "10000",
        },
      ],
      tableDataGjs: [
        {
          id: "1",
          name: "黄金",
          kfgh: "否",
          cs: "99%",
          ys: "黄",
          jjz: "121",
          ssjj: "10000",
          shl: "3",
          lhz: "4",
          gjszj: "20000",
          price_sum: "10000",
        },
        {
          id: "2",
          name: "铂金",
          kfgh: "是",
          cs: "99%",
          ys: "白",
          jjz: "1231",
          ssjj: "10000",
          shl: "3",
          lhz: "4",
          gjszj: "20000",
          price_sum: "10000",
        },
        {
          id: "3",
          name: "铂金",
          kfgh: "是",
          cs: "99%",
          ys: "白",
          jjz: "1231",
          ssjj: "10000",
          shl: "3",
          lhz: "4",
          gjszj: "20000",
          price_sum: "10000",
        },
      ],
      tableDataPj: [
        {
          id: "1",
          name: "配件1",
          namegjs: "黄金",
          kfgh: "否",
          cs: "99%",
          ys: "黄",
          jjz: "1231",
          gfdj: "234",
          gfzj: "444",
          gjsdj: "10000",
          gjszj: "20000",
          price_sum: "10000",
        },
        {
          id: "2",
          name: "配件2",
          namegjs: "铂金",
          kfgh: "是",
          cs: "99%",
          ys: "白",
          jjz: "1231",
          gjsdj: "10000",
          gjszj: "20000",
          price_sum: "10000",
        },
        {
          id: "3",
          name: "配件3",
          namegjs: "铂金",
          kfgh: "是",
          cs: "99%",
          ys: "白",
          jjz: "1231",
          gjsdj: "10000",
          gjszj: "20000",
          price_sum: "10000",
        },
      ],

      form: {
        typeId: "",
      },

      select: {
        name: "",
        introduce: "",
        cooperative_brand: "",
        customer_status: "",
        customer_level: "",
        now_principal_id: "",
        last_follow_up_date: "",
        create_date: "",
      },



      options1: [],
      pickerOptions: {
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      
    };
  },
  components: {
    "dialog-tools": "url:../tools/dialog-tools.vue",
    "dialog-search-customer": "url:./search-customer.vue",
    "dialog-search-product": "url:./search-product.vue",
  },
};
</script>
